import {API} from '../api/index.js'



/**
 * 获取用户优惠券列表
 * @param {*} id 
 */
const _getUserCoupon = function(param) {
    const url = "/mobile/coupon/getUserCoupon";
    const result = API.post(url,param);
    return result;
};


/**
 * 领取优惠券
 * @param {*} param 
 */
const _receiveCoupon = function(param) {
    const url = "/mobile/coupon/receiveCoupon";
    const result = API.post(url,param);
    return result;
};


/**
 * 获取当前红包活动及其下优惠券
 * @param {*} param 
 */
const _getCoupon = function(param) {
    const url = "/mobile/coupon/getCoupon";
    const result = API.post(url,param);
    return result;
};


/**
 * 个人中心进入卡包
 * @param {*} param 
 */
const _getUserCouponList = function(param) {
    const url = "/mobile/coupon/getUserCouponList";
    const result = API.post(url,param);
    return result;
};


/**
 * 获取红包活动
 * @param {*} param 
 */
const _getCouponActivity = function(param) {
    const url = "/mobile/coupon/getCouponActivity";
    const result = API.post(url,param);
    return result;
};



export {
    _getUserCoupon,
    _receiveCoupon,
    _getCoupon,
    _getUserCouponList,
    _getCouponActivity
}